package com.ruiyian.bridge.info.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruiyian.bridge.info.domain.DistanceInfo;
import com.ruiyian.bridge.project.domain.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.Date;
import java.util.List;

/**
 * @Description: 激光测距数据
 * @Author: jeecg-boot
 * @Date:   2020-08-25
 * @Version: V1.0
 */
@Mapper
public interface DistanceInfoMapper extends BaseMapper<DistanceInfo> {

	DataAnalysisVo getNowMinData(@Param("addr") String addr, @Param("macaddr") String macaddr, @Param("startTime") String startTime, @Param("endTime") String endTime);

	DistanceInfo getprevMinData(@Param("macaddr") String macaddr, @Param("prevDate") Date prevDate);

	List<DistanceSummaryVo> queryPageListByDay(Mmh2oDayQueryBo bo);

	/**
	 * 桥梁分组统计激光位移
	 * @param bo
	 * @return
	 */
	List<BridgeSummaryVo> queryPageListByBridgeList(Mmh2oDayQueryBo bo);

	List<DistanceInfo> queryDataListByAddr(Mmh2oQueryBo bo);

	List<DistanceInfo> queryDataAbove(@Param("value") Double value, @Param("startDate") String startDate);

	/**
	 * 根据桥墩分组统计
	 * @param bo
	 * @return
	 */
	List<BridgeSummaryVo> queryPageListByPier(Mmh2oDayQueryBo bo);

	List<DataAnalysisVo> queryMonitorDataPageList(MonitorDataExcelBo query);

	List<DataAnalysisVo> queryDisByDateType(DataAnalysisDto dataAnalysisDto);

	List<DataAnalysisVo> queryDisByDateSenNo(DataAnalysisDto dataAnalysisDto);

	List<DataAnalysisVo> queryDisByDateSenNoCorr(DataAnalysisDto dataAnalysisDto);

	List<DataAnalysisVo> getNowMinDataByType(DataAnalysisDto dataAnalysisDto);

	DataAnalysisVo queryNowDisByDateType(DataAnalysisDto dataAnalysisDto);


	List<DataAnalysisVo> getDataList(@Param("startNum") Long startNum, @Param("endNum") Long endNum);


	Long queryCount();

	Long queryRemoteCount();

	String selectBaseValue(@Param("macAddr") String macAddr, @Param("addr") String addr);
}
